package com.xisoft.devise.service.impl;

import com.xisoft.base.service.XfServiceImpl;
import com.xisoft.devise.entity.UserVO;
import com.xisoft.devise.mapper.UserInfoMapper;
import com.xisoft.devise.service.IUserInfoService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * @Author xzh
 * @Date 2022/6/6 11:45
 * @Description
 * @Version 1.0
 **/
@Service ("UserInfoServiceImpl")
@Transactional
public class UserInfoServiceImpl extends XfServiceImpl implements IUserInfoService
{

    // @Qualifier (value = "UserInfoMapper")
    UserInfoMapper uaerMapper;

    @Override public int deleteById(String id)
    { return uaerMapper.deleteById(id); }

    @Override public int updById(UserVO userVO)
    {
        int i = getBaseMapper().updateById(userVO);
        i = 0 / 0;
        return i;
    }

    @Override public int insert(UserVO userVO)
    {
        int i = uaerMapper.insert(userVO);
        return i;
    }

    @Override public Object getSignKey(String id)
    {
        Map map = uaerMapper.getMapById(id);
        // UserVO userVO = uaerMapper.getById(id);
        // Map map2 = (Map) super.getById(id);
        System.err.println(map.toString());
        return map;
    }
}